package cn.stylefeng.guns.modular.single.service.impl;

import cn.stylefeng.guns.modular.single.entity.DiseaseCS;
import cn.stylefeng.guns.modular.single.entity.DiseaseType;
import cn.stylefeng.guns.modular.single.entity.Hqms;
import cn.stylefeng.guns.modular.single.mapper.DiseaseTypeDAO;
import cn.stylefeng.guns.modular.single.mapper.HqmsDao;
import cn.stylefeng.guns.modular.single.service.HqmsService;
import cn.stylefeng.roses.kernel.dict.modular.mapper.DictMapper;
import cn.stylefeng.roses.kernel.dsctn.api.annotation.DataSource;
import cn.stylefeng.roses.kernel.dsctn.api.context.CurrentDataSourceContext;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
public class HqmsServiceImpl extends ServiceImpl<HqmsDao, Hqms> implements HqmsService {
    @Resource
    private HqmsDao dao;
    @DataSource(name = "test")
    public  List<Map<String,Object>> getDiseaseCS(String bah){
  //      CurrentDataSourceContext.setDataSourceName("archive");
        String dataSourceName = CurrentDataSourceContext.getDataSourceName();
      return   dao.getDiseaseCS(bah);
    }
}
